#!/bin/bash
# oneapi config
source /opt/intel/oneapi/setvars.sh --force

# x86 cuda
cmake -B out -S . \
    -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
    -DCMAKE_BUILD_TYPE=Release \
    -G Ninja
cmake --build out

# pyext
# cd pyext && ./build.sh && cd -

jq -s add **/compile_commands.json > compile_commands.json
echo "Build completed."
